package com.dongnaoedu.rpc.redis.spring;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

/**
 * 接收响应数据
 * 
 * @author Tony
 *
 */
@Component
public class ConsumerListener implements MessageListener {
	private final Log log = LogFactory.getLog(getClass());

	/**
	 * 收到响应内容后，要有相应的方法通知对应的调用者
	 */
	@Override
	public void onMessage(Message message, byte[] pattern) {
		log.info("收到一个执行结果：" + new String(message.getBody()));
		log.error("未实现: 收到响应内容后，要有相应的方法通知对应的调用者");
	}

}
